# !/usr/bin/env python
# -*-coding:utf-8 -*-

"""
# Author     ：skyTree
# version    ：python 3.11
# Description：response的统一封装
"""
from typing import List, Dict, Any


def base_response(code, msg, data: Any = None):
    """基础返回格式"""
    result = {
        "code": code,
        "msg": msg,
        "data": data
    }
    return result


def base_detail_response(code, msg, data: Dict = None):
    """基础返回格式"""
    if data is None:
        data = {}
    result = {
        "code": code,
        "msg": msg,
        "data": data
    }
    return result
